<template>
  <div class="app">
    <van-nav-bar title="cs-1906" left-text="返回" left-arrow @click-left="onClickLeft" fixed/>
    <router-view></router-view>
    <van-tabbar v-model="active">
      <van-tabbar-item icon="home-o" to="/home">home</van-tabbar-item>
      <van-tabbar-item icon="friends-o" to="/friends">friends</van-tabbar-item>
      <van-tabbar-item icon="cart-o" :info="$store.getters.getAllCount" to="/cart">cart</van-tabbar-item>
      <van-tabbar-item icon="search" to="/search">search</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  data: () => ({
    active: 0
  }),
  created () {},
  methods: {
    onClickLeft () {
      console.log('返回上一页')
    }
  }
}
</script>
<style lang="less" scoped>
.app {
  padding-bottom: 50px;
  padding-top: 46px;
}
</style>
